<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <title>杭州美卓-多功能局放仪 /超声波成像仪 /局放在线监测 /SF6气体监测方案生产商</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="js/js_z.js"></script>
    <link rel="stylesheet" type="text/css" href="css/thems.css">
    <link rel="stylesheet" type="text/css" href="css/responsive.css">
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?c9d08b45c38995ade27133094e176186";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>

<body>
    <!--头部-->
    <div class="r_top">
        <span>免费咨询电话：<b>0571-85159673
                / 13575788882</b></span>

    </div>
    <div class="head clearfix">
        <div class="logo"><a href="index.html"><img src="img/logo.jpeg" alt="杭州美卓自动化有限公司"></a></div>
        <div class="head_r">

            <div class="nav_m">
                <div class="n_icon">导航栏</div>
                <ul class="nav clearfix">
                    <li><a href="index.html">网站首页</a></li>
                    <li class="now"><a href="about.html">关于我们</a></li>
                    <li><a href="product.html">产品系列</a></li>
                    <li><a href="service.html">解决方案</a></li>
                    <li><a href="news.html">公司动态</a></li>
                    <li><a href="contact.html">联系我们</a></li>
                </ul>
            </div>
        </div>
    </div>
    <!--头部-->
    <!--幻灯片-->
    <div class="banner banner_s"><img src="img/banner_a.jpeg" alt=""></div>
    <!--幻灯片-->
    <div class="scd clearfix">
        <div class="scd_l">
            <div class="name"><img src="img/sn3.png" width="143" height="47" alt=""></div>
            <ul class="s_nav clearfix" id="modelType">
                <li class="now">
                    <a href="#"><span>公司简介</span></a>
                </li>
                <li>
                    <a href="#"><span>公司荣誉</span></a>
                </li>
                <li>
                    <a href="#"><span>公司文化</span></a>
                </li>
                <li>
                    <a href="#"><span>公司历程</span></a>
                </li>
            </ul>
        </div>
        <div class="scd_r">
            <div class="r_title" id="r_title">
                公司简介<span>/<em>Company profile</em></span>
            </div>
            <div class="scd_m">
                <div class="about clearfix" id="aboutUsContent">
                </div>
            </div>
        </div>
    </div>
    <!-- 页脚占位符 -->
    <div id="footer-placeholder"></div>
    <script>
        let initData = {}
        $.ajax({
            type: "POST",
            url: "https://www.mzpower.com/api/modelChildren/list",
            data: {
                page: 1,
                pageSize: 10,
                parentId: 1,
            },
            dataType: "json",
            crossDomain: true,
            success: function (data) {
                $('#modelType').empty();   //清空resText里面的所有内容
                initData = data.list[0]
                let typeList = data.list.map(item => { return { type: item.id, name: item.name } })
                var html = '';
                $.each(typeList, function (commentIndex, comment) {
                    html += `
                    <li style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" data-type=${comment.type}>
            	        <a href="#"><span >${comment.name}</span></a>
                    </li>`
                });
                $('#modelType').html(html);
                initModel()
                $('#modelType li').click(function () {
                    $('#modelType li').removeClass('now')
                    $(this).addClass('now')
                    $('#r_title').text($(this).text())
                    console.log($(this).data('type'));
                    getModelByType($(this).data('type'))
                })
            }
        })

        function initModel() {
            $('#r_title').text(initData.name)
            getModelByType(initData.id)
            $('#modelType li')[0].setAttribute("class", "now");
        }

        function getModelByType(value) {
            $.ajax({
                type: "POST",
                url: "https://www.mzpower.com/api/modelChildren/detail",
                data: {
                    id: value
                },
                dataType: "json",
                crossDomain: true,
                success: function (data) {
                    $('#aboutUsContent').empty();   //清空resText里面的所有内容
                    $('#aboutUsContent').html(data.content);
                }
            })
        }

    </script>

    <!-- 加载页脚组件 -->
    <script>
        $.get('includes/footer-component.html', function(data) {
            $('#footer-placeholder').html(data);
        }).fail(function() {
            console.warn('无法加载页脚组件');
        });
    </script>

    <!-- 统计代码 -->
    <script async src="https://0199a2af-6c56-7918-afd6-e4d71e273363.spst2.com/ustat.js"></script>
</body>

</html>